﻿using System.Linq;

namespace ImageGallery.DAL
{
    public class GenericDAO<TEntity> where TEntity : class
    {
        protected static EntitiesModel IGEntitiesModel
        {
            get
            {
                return EntitiesModelManager.IGEntitiesModel;
            }
        }

        public static IQueryable<TEntity> GetAll()
        {
            IQueryable<TEntity> enitities = IGEntitiesModel.GetAll<TEntity>();
            return enitities;
        }

        public static void SaveChanges()
        {
            IGEntitiesModel.SaveChanges();
        }
    }
}
